/*
 * Camera.cc
 *
 *  Created on: Apr 3, 2012
 *      Author: victor
 */

#include "Camera.h"

extern char world[9];

Camera::Camera(int newId, Merger* theMerger) : Thread("Camera"), cameraId(newId), merger(theMerger){
	theMerger->checkInCamera(newId);
}

int Camera::getID(){
	return cameraId;
}

void Camera::run(){
	for (;;){
		merger->receiveImage(cameraId,world[cameraId]);
	}
}
